import request from '@/utils/request'

// 查询拆分规则列表
export function listSplit(query) {
  return request({
    url: '/saleconfig/split/list',
    method: 'get',
    params: query
  })
}

// 查询拆分规则详细
export function getSplit(id) {
  return request({
    url: '/saleconfig/split/' + id,
    method: 'get'
  })
}

// 新增拆分规则
export function addSplit(data) {
  return request({
    url: '/saleconfig/split',
    method: 'post',
    data: data
  })
}

// 修改拆分规则
export function updateSplit(data) {
  return request({
    url: '/saleconfig/split',
    method: 'put',
    data: data
  })
}

// 删除拆分规则
export function delSplit(id) {
  return request({
    url: '/saleconfig/split/' + id,
    method: 'delete'
  })
}
